﻿Public Partial Class DatePicker
    Inherits System.Web.UI.UserControl

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Public Property SelectedDate() As Date
        Get
            If txtDate.Text.Trim.Length = 0 Then
                Return Date.MinValue
            End If
            Return Me.txtDate.Text
        End Get
        Set(ByVal value As Date)
            Me.txtDate.Text = value
        End Set
    End Property

    Public Property Enabled() As Boolean
        Get
            Return txtDate.Enabled
        End Get
        Set(ByVal value As Boolean)
            imgCalendar.Visible = value
            txtDate.Enabled = value
        End Set
    End Property

    Public Property Width() As System.Web.UI.WebControls.Unit
        Get
            Return txtDate.Width
        End Get
        Set(ByVal value As System.Web.UI.WebControls.Unit)
            txtDate.Width = value
        End Set
    End Property

End Class